﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WebmasterTool/Admin.Master" AutoEventWireup="true"
    CodeBehind="CreateUser.aspx.cs" Inherits="Framework.WebmasterTool.Memberships.CreateUser" %>

<%@ Register Src="../../Controls/simpleImageUploadUserControl/SimpleImageUpload.ascx"
    TagName="SimpleImageUpload" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ctlCaption" runat="Server">
    Tạo/Sửa thông tin thành viên
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageContent" runat="Server">
    <asp:Label ID="lblPermissionMessage" runat="server" Font-Bold="true" ForeColor="Red"
        Text="Tài khoản không có quyền truy cập vào trang này" Visible="false"></asp:Label>
    <asp:Panel ID="Panel1" runat="server" Visible="true">
        <table align="center" cellpadding="7" cellspacing="0" border="0">
            <tr>
                <td colspan="2" align="center">
                    <asp:Panel runat="server" ID="PanelMsg" CssClass="lblMsg" Visible="true">
                        <asp:ValidationSummary runat="server" ID="ValidationSummary1" DisplayMode="List"
                            ShowSummary="true" ValidationGroup="CreateAccount" Font-Bold="true" />
                        <asp:Label runat="server" ID="lblMsg" ForeColor="Red" Font-Bold="true"></asp:Label>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="left" style="color: Red">
                    <center>
                        * Thông tin bắt buộc</center>
                </td>
            </tr>
            <!--start Login-->
            <asp:Panel runat="server" ID="PanelLogin">
                <tr>
                    <td align="right" style="font-weight: bold">Ngày hết hạn :</td>
                    <td>
                        <asp:Label ID="lblUserExpired" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="font-weight: bold">
                        <span class="Required">*</span> Tên đăng nhập :
                    </td>
                    <td>
                        <asp:TextBox ID="txtUserName" MaxLength="250" runat="server" Width="250"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvUserName" runat="server" ErrorMessage="Chưa nhập tên đăng nhập"
                            Display="Dynamic" ControlToValidate="txtUserName" ValidationGroup="CreateAccount">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="font-weight: bold">
                        <span class="Required">*</span> Mật khẩu :
                    </td>
                    <td>
                        <asp:TextBox ID="txtPassword" MaxLength="250" runat="server" Width="250" TextMode="Password" />
                        <asp:RequiredFieldValidator ID="rfvPass" runat="server" ErrorMessage="Chưa nhập mật khẩu"
                            Display="Dynamic" ControlToValidate="txtPassword" ValidationGroup="CreateAccount">*</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revPass" runat="server" ErrorMessage="Mật khẩu phải từ 5 đến 20 ký tự"
                            ControlToValidate="txtPassword" ValidationExpression="^\S{5,20}$" ValidationGroup="CreateAccount"
                            Display="Dynamic">*</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="font-weight: bold">
                        <span class="Required">*</span>Nhập lại mật khẩu :
                    </td>
                    <td>
                        <asp:TextBox ID="txtRePassword" MaxLength="250" runat="server" Width="250" TextMode="Password" />
                        <asp:RequiredFieldValidator ID="rfvRePass" runat="server" ErrorMessage="Chưa nhập lại mật khẩu"
                            Display="Dynamic" ControlToValidate="txtRePassword" ValidationGroup="CreateAccount">*</asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="cevEqualPass" runat="server" ErrorMessage="Mật khẩu không giống nhau"
                            Display="Dynamic" ControlToValidate="txtRePassword" ControlToCompare="txtPassword"
                            ValidationGroup="CreateAccount">*</asp:CompareValidator>
                    </td>
                </tr>
            </asp:Panel>
            <!--end Login-->
            <tr>
                <td align="right" style="font-weight: bold">
                    <span class="Required">*</span> Email :
                </td>
                <td>
                    <asp:TextBox ID="txtEmail" MaxLength="250" runat="server" Width="250"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtEmail"
                        ValidationGroup="CreateAccount" ErrorMessage="Chưa nhập địa chỉ email" runat="server"
                        Display="Dynamic">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                        ValidationGroup="CreateAccount" runat="server" ControlToValidate="txtEmail" ErrorMessage="Email sai định dạng"
                        Display="Dynamic">*</asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="font-weight: bold">
                    Họ :
                </td>
                <td>
                    <asp:TextBox ID="txtFirstName" MaxLength="250" runat="server" Width="250" />
                </td>
            </tr>
            <tr>
                <td align="right" style="font-weight: bold">
                    Tên :
                </td>
                <td>
                    <asp:TextBox ID="txtLastName" MaxLength="250" runat="server" Width="250" />
                </td>
            </tr>
            <tr>
                <td align="right" style="font-weight: bold">
                    Điện thoại :
                </td>
                <td>
                    <asp:TextBox ID="txtPhone" MaxLength="250" runat="server" Width="250"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" style="font-weight: bold">
                    Hình ảnh/avatar :
                </td>
                <td>
                    <uc1:simpleimageupload id="siuUploadAvatar" runat="server" cssclass="ImageUpload"
                        autoopenimageeditpopupafterupload="true" />
                </td>
            </tr>
            <tr>
                <td align="right" valign="top" style="font-weight: bold">
                    Nhóm quyền :
                </td>
                <td align="left" valign="top">
                    <asp:CheckBoxList RepeatColumns="1" CellSpacing="0" runat="server" ID="chklistRoles"
                        CssClass="Textbox" />
                </td>
            </tr>
            <tr>
                <td colspan="2" align="right">
                    <asp:Button ID="btnBack" runat="server" Text="Quay lại" ValidationGroup="CreateUser"
                        OnClick="btnBack_Click" />
                    &nbsp;
                    <asp:Button runat="server" Text=" Lưu tài khoản " ID="btnSave" ValidationGroup="CreateAccount"
                        OnClick="btnSave_Click" />
                </td>
            </tr>
        </table>
        <br />
        <br />
        <br />
    </asp:Panel>
</asp:Content>
